package org.jground.zk.util;

import org.zkoss.zk.ui.Session;
import org.zkoss.zk.ui.util.SessionCleanup;
import org.zkoss.zk.ui.util.SessionInit;

public class RXSession implements SessionInit, SessionCleanup {

    public void init(Session sess, Object request) throws Exception {
        // HttpSession session= (HttpSession) sess.getNativeSession();
        System.err.println(">MOSessionInit init " + sess.getNativeSession());
        System.err.println(">MOSessionInit request   " + request.getClass());
    }

    public void cleanup(Session sess) throws Exception {
        System.err.println(">MOSessionInit cleanup " + sess.getNativeSession());

    }

    // /** Retrieve info at the constructor, which runs at the servlet thread.
    // */
    // private RXPrincipalMethods methods;
    //
    // public MOSecurityThreadInit() {
    // methods = RXSystem.getMOPrincipalMethods();
    // System.err.println(">>>>MOSecurityThreadInit constructor " + methods);
    // }
    //
    // // -- EventThreadInit --//
    // /** Initial the event processing thread at this method. */
    // public boolean init(Component comp, Event evt) {
    // // RXPrincipalMethods testPrincipalMethods = new
    // // DefaultRXPrincipalMethods("toni", new String[] { "READER",
    // // "UPDATER" }, "de");
    // RXSystem.setMOPrincipalMethods(methods);
    // System.err.println(">>>>MOSecurityThreadInit init "+ methods);
    // return true;
    // }
    //
    // public void prepare(Component comp, Event event) throws Exception {
    // methods = RXSystem.getMOPrincipalMethods();
    // System.err.println(">>>>MOSecurityThreadInit prepare " + methods);
    // }
}